import request from '@/utils/request'


// 查询商户信息详细
export function lockRate(sellCurrency, buyCurrency, sellAmount) {
  return request({
    url: '/bison/lockRate/',
    data: {sellCurrency:sellCurrency, buyCurrency:buyCurrency, sellAmount:sellAmount},
    method: 'post'
  })
}
export function exchange(lockId) {
  return request({
    url: '/bison/exchange/' + lockId,
    method: 'get'
  })
}

// BISON 新增 VA收款人
export function addPayee(data) {
  return request({
    url: '/bison/addPayee',
    method: 'post',
    data: data
  })
}

//BISON 修改VA收款人
export function updatePayee(data) {
  return request({
    url: '/bison/updatePayee',
    method: 'put',
    data: data
  })
}

//BISON 删除VA收款人
export function delPayee(id) {
  return request({
    url: '/bison/delPayee/' + id,
    method: 'delete'
  })
}


export function submitKyc(mchNo, data) {
  return request({
    url: '/bison/submitKyc/' + mchNo,
    data: data,
    method: 'post'
  })
}

export function submitChargeAudit(orderId) {
  return request({
    url: '/bison/submitChargeAudit/' + orderId,
    method: 'post'
  })
}
export function submitToBison(orderId, auditResult) {
  return request({
    url: '/bison/submitToBison/' + orderId + '?auditResult=' + auditResult,
    method: 'post'
  })
}


export function applyAccount(data) {
  return request({
    url: '/bison/applyAccount/',
    data: data,
    method: 'post'
  })
}


export function queryWithdrawInfo() {
  return request({
    url: '/bison/queryWithdrawInfo/',
    method: 'get'
  })
}
export function withdraw(data) {
  return request({
    url: '/bison/withdraw',
    data: data,
    method: 'post'
  })
}


export function auditSettle(data) {
  return request({
    url: '/bison/auditSettle',
    data: data,
    method: 'post'
  })
}
export function downloadCert(id) {
  return request({
    url: '/bison/downloadCert/' + id,
    method: 'get'
  })
}
export function getFaceQrUrl() {
  return request({
    url: '/bison/getFaceQrUrl' ,
    method: 'get'
  })
}
export function queryCommonRate() {
  return request({
    url: '/bison/queryCommonRate' ,
    method: 'get'
  })
}


export function queryBisonStat(query) {
  return request({
    url: '/bison/queryBisonStat',
    method: 'get',
    params: query
  })
}
